package com.ruoyi.check.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.check.mapper.ECheckListFormSubItemMapper;
import com.ruoyi.check.domain.ECheckListFormSubItem;
import com.ruoyi.check.service.IECheckListFormSubItemService;

/**
 * 检点项Service业务层处理
 *
 * @author hugh.sun
 * @date 2023-03-23
 */
@Service
public class ECheckListFormSubItemServiceImpl implements IECheckListFormSubItemService
{
    @Autowired
    private ECheckListFormSubItemMapper eCheckListFormSubItemMapper;

    /**
     * 查询检点项
     *
     * @param id 检点项主键
     * @return 检点项
     */
    @Override
    public ECheckListFormSubItem selectECheckListFormSubItemById(Long id)
    {
        return eCheckListFormSubItemMapper.selectECheckListFormSubItemById(id);
    }

    /**
     * 查询检点项列表
     *
     * @param eCheckListFormSubItem 检点项
     * @return 检点项
     */
    @Override
    public List<ECheckListFormSubItem> selectECheckListFormSubItemList(ECheckListFormSubItem eCheckListFormSubItem)
    {
        return eCheckListFormSubItemMapper.selectECheckListFormSubItemList(eCheckListFormSubItem);
    }

    /**
     * 新增检点项
     *
     * @param eCheckListFormSubItem 检点项
     * @return 结果
     */
    @Override
    public int insertECheckListFormSubItem(ECheckListFormSubItem eCheckListFormSubItem)
    {
        eCheckListFormSubItem.setCreateTime(DateUtils.getNowDate());
        return eCheckListFormSubItemMapper.insertECheckListFormSubItem(eCheckListFormSubItem);
    }

    /**
     * 修改检点项
     *
     * @param eCheckListFormSubItem 检点项
     * @return 结果
     */
    @Override
    public int updateECheckListFormSubItem(ECheckListFormSubItem eCheckListFormSubItem)
    {
        return eCheckListFormSubItemMapper.updateECheckListFormSubItem(eCheckListFormSubItem);
    }

    /**
     * 批量删除检点项
     *
     * @param ids 需要删除的检点项主键
     * @return 结果
     */
    @Override
    public int deleteECheckListFormSubItemByIds(Long[] ids)
    {
        return eCheckListFormSubItemMapper.deleteECheckListFormSubItemByIds(ids);
    }

    /**
     * 删除检点项信息
     *
     * @param id 检点项主键
     * @return 结果
     */
    @Override
    public int deleteECheckListFormSubItemById(Long id)
    {
        return eCheckListFormSubItemMapper.deleteECheckListFormSubItemById(id);
    }

    @Override
    public List<ECheckListFormSubItem> findzixuanxiang(Long id) {

        return eCheckListFormSubItemMapper.findzixuanxiang(id);

    }
}
